Skip to content

Fix !summarize for links in angle brackets or with query strings - #43

Merged
kiliankoe merged 4 commits into
mainfrom
fix-summarize-links
Nov 13, 2026
Merged

kiliankoe merged 4 commits into
mainfrom
fix-summarize-links

Conversation

@kiliankoe

@kiliankoe kiliankoe commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

!summarize failed on links wrapped in <…>, which is how Discord users and feed posts suppress link previews. The link pattern kept the closing >, so Kagi was asked to summarize a URL that doesn't exist and answered with a 500. The bot only logged the status and said nothing in the channel.

The link pattern now stops at >. The link is also encoded as a single query value: &, = and + were left unencoded before, so a link like youtube.com/watch?v=…&t=… reached Kagi cut off at the &.

When an API call fails, the HTTP helpers now log the start of the response body, where APIs explain the error. The body stays out of the error's description because !xcode and !se post that description to the channel. !summarize now replies in the channel when it fails, with the details only in the log.

Markdown masked links ([text](https://…)) still keep a trailing ). Stripping it would break URLs that legitimately end in ), such as Wikipedia's.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QpqSb1b4xUhYTBckar28PZ

@kiliankoe
kiliankoe enabled auto-merge (rebase) November 13, 2026 08:31
@kiliankoe
kiliankoe merged commit a2fcf56 into main Nov 13, 2026
2 checks passed
@kiliankoe
kiliankoe deleted the fix-summarize-links branch November 13, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant